<script lang="ts" setup>
defineProps({
  connect: {
    type: Boolean,
    default: false,
  },
});
</script>

<template>
  <div class="connect-status-wrap">
    <div class="item" v-if="connect">
      <svg-icon class="icon" name="item-open"></svg-icon>
      <span>连接成功</span>
    </div>
    <div class="item" v-else>
      <svg-icon class="icon" name="item-error"></svg-icon>
      <span>连接失败</span>
    </div>
  </div>
</template>

<style lang="less" scoped>
.connect-status-wrap {
  width: 100%;
  .item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    .icon {
      width: 16px;
      height: 16px;
    }
    span {
      margin-left: 4px;
    }
  }
}
</style>
